import request from '@/utils/request'

// 查询模块列表
export function listModular(query) {
  return request({
    url: '/reportworld/modular/list',
    method: 'get',
    params: query
  })
}

// 查询模块详细
export function getModular(data) {
  return request({
    url: '/reportworld/modular/getModular',
    method: 'post',
    data: data
  })
}

// 新增模块
export function addModular(data) {
  return request({
    url: '/reportworld/modular',
    method: 'post',
    data: data
  })
}

// 修改模块
export function updateModular(data) {
  return request({
    url: '/reportworld/modular',
    method: 'put',
    data: data
  })
}

// 删除模块
export function delModular(id, hisVersion) {
  const data = {
    id,
    hisVersion
  };
  return request({
    url: '/reportworld/modular/remove',
    method: 'post',
    data: data
  })
}


// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/modular/init',
    method: 'post',
    data: data
  })
}
